package com.cl.datasubscription.controller;

import com.cl.chlorine.controller.BaseController;
import com.cl.chlorine.dto.CommonResult;
import com.cl.datasubscription.entity.SubscribeKeywordTask;
import com.cl.datasubscription.service.SubscribeKeywordTaskService;
import com.cl.datasubscription.task.SubscribeKeywordTaskExecutor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("SubscribeKeywordTask")
public class SubscribeKeywordTaskController extends BaseController<SubscribeKeywordTask> {
    public SubscribeKeywordTaskController(SubscribeKeywordTaskService service) {
        super(service);
    }

    @PostMapping("addData")
    public CommonResult addData(@RequestBody String data) {
        return SubscribeKeywordTaskExecutor.addData(data);
    }
}
